package com.hsc.www.amqp;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.messaging.Message;
import org.springframework.stereotype.Component;

@Component
public class UserReceiver {


    @RabbitListener(queues = "123456q", errorHandler = "myRabbitListenerErrorHandler")
    public void receiv1e(Channel channel, Message message) throws Exception {


        Object payload = message.getPayload();
        System.out.println("接收：queueName=" + "   ");
        throw new RuntimeException();


    }


}
